﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DesignPatternDemoCApp.Structured.AdapterPattern
{
    /// <summary>
    /// 三孔到二孔转换的适配器Adapte
    /// </summary>

    public class ThreeToTwoAdapter : TwoHoleTarget
    {
        // 引用三孔插头的实例,从而将客户端与TwoHole联系起来
        private ThreeHoleAdaptee threeHoleAdaptee = new ThreeHoleAdaptee();
        //这里可以继续增加适配的对象。。


        /// <summary>
        /// 重写父类方法
        /// </summary>
        public override void Request()
        {
            threeHoleAdaptee.SpecificRequest();
            //可以继续转换工作
        }
    }
}
